package com.ruoyi.device.api.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 设备上下线日志对象 device_on_off_log
 * 
 * @author luogongquan
 * @date 2024-09-06
 */
public class DeviceOnOffLog extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long id;

    /** 设备id */
    @Excel(name = "设备id")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long deviceId;

    /** 上下线类型  （1：上线  0：下线） */
    @Excel(name = "上下线类型  ", readConverterExp = "1=上线,0=下线")
    private String onlineType;

    /** 会话标志 */
    @Excel(name = "会话标志")
    private String sessionFlag;

    /** 上下线时间 */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "上下线时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date time;

    /** 设备编号 */
    @Excel(name = "设备编号")
    private String deviceNo;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setDeviceId(Long deviceId) 
    {
        this.deviceId = deviceId;
    }

    public Long getDeviceId() 
    {
        return deviceId;
    }
    public void setOnlineType(String onlineType) 
    {
        this.onlineType = onlineType;
    }

    public String getOnlineType() 
    {
        return onlineType;
    }
    public void setSessionFlag(String sessionFlag) 
    {
        this.sessionFlag = sessionFlag;
    }

    public String getSessionFlag() 
    {
        return sessionFlag;
    }
    public void setTime(Date time) 
    {
        this.time = time;
    }

    public Date getTime() 
    {
        return time;
    }
    public void setDeviceNo(String deviceNo) 
    {
        this.deviceNo = deviceNo;
    }

    public String getDeviceNo() 
    {
        return deviceNo;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("deviceId", getDeviceId())
            .append("onlineType", getOnlineType())
            .append("sessionFlag", getSessionFlag())
            .append("time", getTime())
            .append("createTime", getCreateTime())
            .append("deviceNo", getDeviceNo())
            .toString();
    }
}
